﻿@{
    var Obj = Model as Object;
    var menu = ViewBag.Menu as IMenu;
    if (menu == null) menu = Context.Items["CurrentMenu"] as IMenu;
    var name = menu.Name.ToLower();

    var cls_li = "nav-item me-0 pt-2 pm-3 text-start";
    var cls = "nav-link text-gray-700";
    var cls_active = "nav-link active bg-light-info text-info";

    var cls_core = name.EqualIgnoreCase("Core") ? cls_active : cls;
    var cls_sys = name.EqualIgnoreCase("Sys") ? cls_active : cls;
    var cls_xcode = name.EqualIgnoreCase("XCode") ? cls_active : cls;
    var cls_cube = name.EqualIgnoreCase("Cube") ? cls_active : cls;
    var cls_oauthconfig = name.EqualIgnoreCase("OAuthConfig") ? cls_active : cls;


}

<ul class="nav nav-tabs nav-pills flex-row border-0 flex-md-column mt-2 mb-3 mb-md-0 fs-6">
    <li class="@cls_li">
        @Html.ActionLink("基本设置", "Index", "Core", null, new { @class = @cls_core })
    </li>
    <li class="@cls_li">
        @Html.ActionLink("系统设置", "Index", "Sys", null, new { @class = @cls_sys })
    </li>
    <li class="@cls_li">
        @Html.ActionLink("数据中间件", "Index", "XCode", null, new { @class = @cls_xcode })
    </li>
    <li class="@cls_li">
        @Html.ActionLink("魔方设置", "Index", "Cube", null, new { @class = @cls_cube })
    </li>
    <li class="@cls_li">
        @Html.ActionLink("OAuth设置", "Index", "OAuthConfig", null, new { @class = @cls_oauthconfig })
    </li>
</ul>
